﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>


<!-- 文件上传需要的样式 -->

<link rel="stylesheet" type="text/css"
	href="${path }/resource/plugin/kindeditor/themes/default/default.css" />
<link rel="stylesheet" type="text/css"
	href="${path }/resource/plugin/kindeditor/plugins/code/prettify.css" />
<script type="text/javascript"
	src="${path }/resource/plugin/kindeditor/kindeditor.js"></script>
<script type="text/javascript"
	src="${path }/resource/plugin/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript"
	src="${path }/resource/plugin/kindeditor/plugins/code/prettify.js"></script>

<title></title>
</head>

<form class="form form-horizontal" method="post" style="display: none;"
	enctype="multipart/form-data" target="blankFrame"
	action="${path }/resource/plugin/kindeditor/zking_upload_json.jsp?fileType=image&hiddenId=photo&flag=img_1">
	<input id="fileText" type="file" multiple name="file-1"
		onchange="fileChange()" /> <input type="submit" id="submitBtn" />
</form>
<input id="hiddenImg" style="display: none;">
<iframe src="" name="blankFrame" id="blankFrame"
	style="height: 100px; width: 100px; display: none;"></iframe>

<div class="ibox-content">
	<form class="form-horizontal" id="dataform" onsubmit="javascripr:return false;">
			<input type="hidden" name="senderId" value="${senderId}">
		<div class="form-group control-label">
		<label class="col-sm-2 control-label">项目</label>
				<div class="col-sm-3">
					<select class="select2 form-control" size="1" dataType="*"
						name="projId">
						<option value="">--请选择服务项目--</option>
						<c:forEach items="${projectList}" var="it">
							<option value="${it.id }">${it.projName }</option>
						</c:forEach>
					</select>
					<div class="Validform_checktip"></div>
		</div>
		<label class="col-sm-2 control-label">日志抄送人</label>
				<div class="col-sm-2">
					 <select name="userId" id="userId"  class="select2 form-control autoFull" 
										multiple="multiple"
										style="width: 200px" 
										data-url="${path}/admin/WorkLogAction/selectMentor" 
										data-filed="name"
										data-value="id"
										dataType="*">
					<option value="">请选择创建人</option>
					</select>
					<div class="Validform_checktip"></div>
		</div>
		
		</div>
		
		<div class="form-group control-label">
			<label class="col-sm-2 control-label">工作时长</label>
			<div class="col-sm-3">
			<input type="text" dataType="hll" placeholder="请输入小时支持0.5小时" class="form-control" 
				value="" name="workingHours" nullmsg="输入的时长不能为空" errormsg="请输入正确的时长格式">
			</div>
			<div class="Validform_checktip"></div>
			
			<label class="col-sm-2 control-label">日期</label>
			<div class="col-sm-3">
			 <input name="createTime" type="text" placeholder="请填写日期"
						class="form-control datetimepicker" id="createTime" >
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">日志内容</label>
			 <div class="col-sm-4">
			 <textarea rows='5' cols='80' name="workContent"  dataType="*"></textarea>
			 </div>
			 <div class="Validform_checktip"></div>
		</div>
		
				
		<div class="form-group ">
			<div class="col-sm-12 text-center">
				<a href="javascript:;" onclick="myForm.submit()"
					class="btn btn-success radius">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<button onclick="MTools.closeForm()" class="btn btn-danger radius">取消</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
	MTools.autoFullSelect();
	var myForm = MForm.initForm({
		invokeUrl : "${path}/admin/WorkLogAction/addWorklog",
		afterSubmit:function(){
			parent.myGrid.serchData();
		}
	});
	$(function(){
		 var _initParam = {
					format : 'yyyy-mm-dd',
					todayBtn : false,
					autoclose : true,
					startView : 2,
					maxView : 2,
					minView : 2,
					endDate: new Date()
				};
				MTools.ininDatetimepicker(_initParam);
				//限制结束时间不小于开始时间
				var initParam = {
					format : 'yyyy-mm-dd',
					todayBtn : false,
					autoclose : true,
					startView : 2,
					maxView : 2,
					minView : 2,
					endDate: new Date()
				};
				MTools.limitStartEndTime(initParam);
	});
	$('#userId').select2({
		  allowClear: true
		});
</script>


</body>
</html>